export default function formatDate(dt) {
  // debugger
  if (!dt) {
    dt = new Date()
  }
  let year = dt.getFullYear()
  let month = dt.getMonth()
  let date = dt.getDate()
  if (month < 10) {
    month = '0' + month
  }
  if (date < 10) {
    date = '0' + date
  }
  return year + '-' + month + '-' + date
}
